/*
 * Created on Fri Jun 15 2018 by Ronnie Ren (zhaosong.ren) from Accenture
 *
 * Copyright (c) 2018 DingXin information & technology limited company.
 */

import {ObjectDto, ObjectDtoInterface} from "../../services/sqliteDB/object.dto";
import { TableColumnType } from "../../services/sqliteDB/object.dto";
import {SyncStatus} from "../sync-status";


export class ElectricityMeterDto extends ObjectDto implements ObjectDtoInterface {
    public billId: string = null;
    public userId: string = null;
    public billDate: number = null;
    public actualElectricity: number = null; //  实收电量
    public actualMoney: number = null; //  实收金额
    public arrearsTotal: number = null; //  欠费总额
    public arrearsFee: number = null; //  欠电费
    public arrearsAdditionalFee: number = null; //  欠附加费
    public lastTableNum: number = null; //  上次表数
    public theTableNum: number = null; //  本次表示数
    public tableNumDifference: number = null; //  表示数差额
    public comprehensiveRate: string = null;  // 综合倍率
    public createdBy: string = null;   // 创建人Id
    public createdTime: number = null;   // 创建时间
    public updatedBy: string  = null;  // 更新人Id
    public updatedTime: number = null;   // 更新时间
    public meterId: string = null;   // 电表Id
    public meterNo: string = null;
    public mixRatio: string = null;
    public syncStatus: SyncStatus = SyncStatus.None;

    table() {
        return {
            tableName: "ElectricityMeters",
            tableConstructor: {
                billId: `${TableColumnType.text}`,
                userId: `${TableColumnType.text}`,
                billDate: `${TableColumnType.int}`,
                actualElectricity: `${TableColumnType.int}`,
                actualMoney: `${TableColumnType.int}`,
                arrearsTotal: `${TableColumnType.int}`,
                arrearsFee: `${TableColumnType.int}`,
                arrearsAdditionalFee: `${TableColumnType.int}`,
                lastTableNum: `${TableColumnType.int}`,
                theTableNum: `${TableColumnType.int}`,
                tableNumDifference: `${TableColumnType.int}`,
                comprehensiveRate: `${TableColumnType.text}`,
                createdBy: `${TableColumnType.text}`,
                createdTime: `${TableColumnType.int}`,
                updatedBy: `${TableColumnType.text}`,
                updatedTime: `${TableColumnType.int}`,
                meterId: `${TableColumnType.text}`,
                meterNo: `${TableColumnType.text}`,
                mixRatio: `${TableColumnType.text}`,
                syncStatus: TableColumnType.int
            }
        };
    }
 }
